//! print table

use prettytable::{Row, Table};

pub trait PrintTable<T>: Sized + IntoIterator<Item = T>
where
    T: Into<Row>,
{
    fn print_table(self) {
        let mut table = Table::new();
        for row in self.into_iter() {
            table.add_row(row.into());
        }

        table.printstd();
    }
}
